-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Allow raising errors from within a custom whatever(#2718) #4188
Conversation
@abdalla-rko If the goal is to update the |
@abdalla-rko are you still working on this? |
Hi @heath-freenome, Sorry for taking too long. I think the initial implementation is now like you suggested updating the errorSchema using onChange in the custom widget. Let me know if it's good and then I'll update the docs and other themes if needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there, just a couple of small things. Also, can you resolve the conflicts?
packages/docs/docs/advanced-customization/custom-widgets-fields.md
Outdated
Show resolved
Hide resolved
packages/docs/docs/advanced-customization/custom-widgets-fields.md
Outdated
Show resolved
Hide resolved
Ordered lodash import
Added missing packages
Added missing space
Reasons for making this change
I introduced a raiseFieldErrors method to raise errors from within a custom component(see #2718).
The current behavior allows errors to be raised from custom components and when the form onChange is triggered, we clear the custom raised errors. I appreciate any feedback on this approach. If everything looks good, I'll write tests and implement this in other themes.
Checklist
npm run test:update
to update snapshots, if needed.